package se.tinkerway.bomberman.util;

import se.tinkerway.bomberman.domain.Tile;
import se.tinkerway.bomberman.domain.TileMap;
import se.tinkerway.bomberman.domain.tile.IndestructableWall;

public class TileMapGenerator {
	public static TileMap generate(int size) {
		Tile[][] tiles = new Tile[size][size];
		
		for (int y = 0; y < size; y++) {
			for (int x = 0; x < size; x++) {
				tiles[y][x] = null;
			}	
		}
		
		for (int i = 0; i < size; i++) {
			tiles[i][0] = new IndestructableWall();
			tiles[i][size - 1] = new IndestructableWall();
			tiles[0][i] = new IndestructableWall();
			tiles[size - 1][i] = new IndestructableWall();
		}
		tiles[2][2] = new IndestructableWall();
		
		return new TileMap(tiles);
	}
}
